import VueRouter from "vue-router";
import GoodsManage from "../views/GoodsManage";
import OrderManage from "../views/OrderManage";
import LeaseManage from "@/views/LeaseManage/LeaseManage"
import LeaseList from '@/views/LeaseManage/LeaseList';
import LeaseAdd from "@/views/LeaseManage/LeaseAdd"
import VideoList from "../views/VideoList"
import VideoExam from "../views/VideoExam"
import VideoComment from "../views/VideoComment"
import TestModel from "../views/TestModel"
import UserManage from "../views/UserManage"
import EmployManage from "../views/EmployManage"
import OrderList from "../views/OrderList"
import LoginApp from "../views/LoginApp"
import LayOut from "../layout"
import Vue from 'vue';
Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        {
            path: '/login',
            component:LoginApp,
            hidden:true
        },
        {
            path: '/',
            component: LayOut,
            redirect: '/goods',
            children:[
                { path: '/goods', component: GoodsManage },
                { path: '/order', component: OrderManage },
                {
                    path: '/lease', component: LeaseManage,
                    redirect: '/lease/list',
                    children: [
                        { path: 'list', component: LeaseList },
                        { path: 'add/:id?', component: LeaseAdd },
                    ]
        
                },
                // { path: '/login', component: LoginApp, hidden: true },
        
                { path: '/videoList', component: VideoList },
                { path: '/videoExam', component: VideoExam },
                { path: '/videoComment', component: VideoComment },
                { path: '/UserManage', component: UserManage },
                { path: '/EmployManage', component: EmployManage },
                { path: '/OrderList', component: OrderList },
                

            ]


        },
        { path: '*', component: TestModel }
    ]
})

export default router